<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>flex实现居中</title>
	<style>
		.box{
			background: pink;
			width: 500px;
			height: 350px;
			border: 1px solid #c00;
			display: flex;
			justify-content: center;
			align-items: center;
		}
		.small{
			color: #fff;
			border: 1px solid black;
		}
	</style>
</head>
<body>
	<div class="box">
		<div class="small">
			Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sit suscipit ducimus aut quibusdam quidem odio quae praesentium magni, natus sed placeat earum, eius ipsum, rem, fuga quia labore qui fugiat.
		</div>
	</div>
</body>
</html>